<template>
	<view class="landInfo"  @click="toLocation(landInfo.id)">
		<image :src="landInfo.issuePhotoList[0].land_photo" mode="aspectFill" lazy-load></image>
		<view>
			<view>
				<view>{{landInfo.province}}{{landInfo.city}}{{landInfo.county}}{{landInfo.area}}亩{{landInfo.type}}用地{{landInfo.circulation}}</view>
				<view>
					<text>{{landInfo.area}}亩</text>|
					<text>{{landInfo.price}}万元</text>|
					<text>{{landInfo.type}}</text>
				</view>
				<view >
					{{landInfo.province}}{{landInfo.city}}{{landInfo.county}}
				</view>
				<view>流转类型:   
					<text>{{landInfo.circulation}}</text>
				</view>
			</view>
			<view class="uni-flex">
				<view><!-- 浏览量: 2000 --></view>
				<!-- 收藏量过万，加过滤器 -->
				<view><image src="../../static/image/collect.png" mode="aspectFill" lazy-load></image>{{collectNumber}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			landInfo:Object
		},
		data() {
			return {
				collectNumber: 0
			}
		},
		mounted(){
			// console.log(this.landInfo.id);
			uni.request({
				url: this.confige.webUrl + "/app/landInfo/statisticsLandCollect",
				data:{
					issue_id: this.landInfo.id
				},
				header:{},
				success: (res) => {
					//console.log(res.data.data);
					this.collectNumber = res.data.data;
				}	
			})	  
		},
		methods:{
			//跳转土地详情页
			toLocation(e) {
				// 缓存土地id
				uni.setStorageSync('landDetailsIssueId', e);
				uni.navigateTo({
					url:"../landDetails/landDetails"
				})
			},
		}
	}
</script>

<style lang="less" scoped>
	@import "../../common/global.less";
	.landInfo{
		margin: 20rpx 20rpx auto;
		display: flex;
		//text-align: center;
		>image{
			width: 250rpx;
			height: 200rpx;
			border-radius: @uni-border-radius-base;
		}
		>view{
			margin: auto;
			width: 450rpx;
			>view:first-child{
				view:first-child{
					margin: 0 @uni-spacing-row-sm;
					overflow: hidden;
					text-overflow:ellipsis;
					white-space: nowrap;
				}
				>view:nth-child(2){
					
					font-size: 15upx;
					>text{
						margin: 0 @uni-spacing-row-sm;
					}
				}
				>view:nth-child(3){
					margin: 0 @uni-spacing-row-sm;
					font-size: 15upx;
					//font-family: KaiTi;
				}
				view:last-child{
					margin: 0 @uni-spacing-row-sm;
					font-size: 20upx;
					>text{
						margin: 0 10upx;
					}
				}
			}
			>view:last-child{
				margin: 0 @uni-spacing-row-sm;
				justify-content: space-between;
				view:first-child{
					
				}
				>view:last-child{
					width: 150upx;
					>image{
						margin-right: @uni-spacing-row-base;
						width: 40upx;
						height: 40upx;
					}
				}
			}
			
		}
	}
</style>
